namespace java com.demo.thrift

enum Status{
	OK,
	CHANNEL
}

struct Student{
	1: required i32 id;
	2: required string username;
	3: required string password;
	4: optional double age;
	5: required Status status;
}

struct School{
	1: required i32 id;
	2: required string name;
	3: optional list<Student> students;
	4: required set<Student> rank;
	5: required map<string, string> number_name;
}

exception InvalidException{
	1: required string why;
}

service ThriftMysqlService{
     void addUser(1:Student user) throws (1:InvalidException ex);
     list<Student> queryAllUser();
     Student queryOneUser(1:i32 id);
     map<string, string> queryOneArticle(1:i32 id);
}